<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>鑫脉络购物商城</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<!--标准mui.css-->
		<link rel="stylesheet" href="../css/mui.min.css">
		<!--自定义的css-->
		<link rel="stylesheet" type="text/css" href="../css/common.css"/>
		<style>
			* {
				margin: 0px;
				padding: 0px;
			}
			body {
				background-color: #F3F3F3;
			}
			.mui-bar-tab .mui-tab-item {
				background-color: #FFFFFF;
				font-size: 12px;
			    color: #676767;
			    letter-spacing: 0.55px;
			    text-align: -webkit-center;
			}
			.mui-bar-tab .mui-tab-item.mui-active{
				background-color: #FFFFFF;
			    font-size: 12px;
			    color: #333334;
			    letter-spacing: 0.46px;
			    text-align: -webkit-center;
			}
			.tab-bottom-homepage{
				background-image:url(../img/index/homepage_icon_norm.png); 
				background-size: 100% 100%;	
			}
			.mui-active .tab-bottom-homepage{		
				background-image:url(../img/index/homepage_icon_pressed.png); 
				background-size: 100% 100%;	
			}
			.tab-bottom-shoppingcar{		
				background-image:url(../img/index/shoppingcar_icon_norm.png); 
				background-size: 100% 100%;	
			}
			.mui-active .tab-bottom-shoppingcar{	
				background-image:url(../img/index/shoppingcar_icon_pressed.png); 
				background-size: 100% 100%;	
			}
			.tab-bottom-mine{
				background-image:url(../img/index/header_icon_norm.png); 
				background-size: 100% 100%;	
			}
			.mui-active .tab-bottom-mine{
				background-image:url(../img/index/header_icon_pressed.png); 
				background-size: 100% 100%;	
			}
			.mui-bar-tab .mui-tab-item .mui-icon {
				top: 8px;
			    width: 25px;
			    height: 25px;
			    padding-top: 0;
			    padding-bottom: 0;
			}
			.special-goods-ID-hide, .special-merchant-ID-hide {
				display: none;
			}
			/**********首页图片**********/
			.mui-search {
				margin-top: 28px;
				padding: 0px 10px;
			}
			.search-div {
				border-radius: 15px;
				background-color: #FFFFFF;
				line-height: 35px;
				border:1px solid #4B0505;
				padding-left: 10px;
			}
			.category-view{
			    width: 100%;
			    margin-top: 20px;
			    display: inline-table; 
			}
			.category-info{
			    text-align: center; 
			    display: inline-block;
			    vertical-align: middle;
			    width: 25%;
			    margin-bottom: 10px;
			}
			.category-image{
			    width: 40px;
			    height: 40px;
			}
			.category-text{
			    font-size: 17px;
			    color: #353535;
			}
			.hot-image-div {
				margin-top: 15px;
				margin-left: 13px;
				margin-right: 13px;
			    position: relative;
			}
			.hot-image {
			    width: 100%;
			    height: 250px;
			}
			.hot-title-div {
				position: absolute;
				top: 10px;
				left: 10px;
			}
			.hot-title-icon {
				width: 15px;
				height: 15px;
			}
			.hot-title {
				font-size: 13px;
				color: #FFFFFF;
			}
			.shadow-view {
			    position: absolute;
			    left: 0px;
			    bottom: 5px;
			    width: 100%;
			    padding-top: 10px;
			    border-bottom-left-radius: 10px;
			    border-bottom-right-radius: 10px;
			    background-color: rgba(0, 0, 0, 0.7);
			}
			.goods-name-text {
			    margin-left: 10px;
			    margin-right: 5px;
			    color: #FFFFFF;
			    font-size: 25px;
			}
			.goods-des-text {
			    margin-left: 10px;
			    margin-bottom: 5px;
			    margin-right: 5px;
			    color: #FFFFFF;
			    font-size: 13px;
			    overflow:hidden; 
			    text-overflow:ellipsis;
			    display:-webkit-box; 
			    -webkit-box-orient:vertical;
			    -webkit-line-clamp:2; 
			}
			.hot-bottom-view {
			   margin-top: 5px;
			   margin-bottom: 10px;
			   position: relative;
			}
			.price-text {
			    color: #FFFFFF;
			    font-size: 16px;
			}
			.hot-text {
				position: absolute;
				right: 20px;
				bottom: 0px;
				color: #FFFFFF;
			    font-size: 16px;
			}
			 .special-view {
			    width: 100%;
			    margin-top: 35px;
			}
			.special-title-div {
				margin-left: 22px;
			}
			.special-view-text {
				color: #353535;
			    font-size: 15px;
			    margin-top: 10px;
			    padding-left: 5px; 
			}
			.category-type-ID {
				display: none;
			}
			/**********首页图片**********/
			/**********购物车**********/
			.shop-name{background:#fff;height:35px;line-height:35px;padding:0 15px;position:relative;}
			.shop-name h4{float:left;font-size:14px;margin-left: 28px; color: #555555;line-height: 25px;}
			.shop-name h4 a{color: #666;}
			.shopping{margin-bottom: 30px; margin-top: 44px; clear:both;overflow:hidden;height:auto;background-color: #F3F3F3;}
			.shop-group-item{margin-bottom:5px;}
			.shop-group-item ul li{border-bottom:1px solid #C5C5C5;list-style: none;}
			.shop-group-item ul li:last-child{border-bottom:none;}
			
			input[type="checkbox"]{-webkit-appearance:none;outline: none;border-width: 0px;}
			input.check{background:url(../img/goods/select_norm_icon.png) no-repeat center left;background-size:20px 20px;position:absolute;top:50%;left:10px;margin-top:-18px;width:20px;height:35px;}
			input.check:checked{background:url(../img/goods/selected_icon.png) no-repeat center left;background-size:20px 20px;}
			input.goodsCheck:checked{background:url(../img/goods/selected_icon.png) no-repeat center left;background-size:20px 20px;}
			input.check:checked{background:url(../img/goods/selected_icon.png) no-repeat center left;background-size:20px 20px;}
			.checked{background:url(../img/goods/selected_icon.png) no-repeat left center;background-size:20px 20px;position:absolute;top:50%;left:15px;margin-top:-18px;width:20px;height:35px;}
			
			.shop-info{background:#FFFFFF;height:120px;padding:0 15px;position:relative;}
			/*.shop-info .checkbox{background:url(../img/goods/select_norm_icon.png) no-repeat left center;background-size:20px 20px;position:absolute;top:50%;left:15px;margin-top:-60px;width:20px;height:120px;}
			.shop-info .checkbox1{background:url(../img/goods/selected_icon.png) no-repeat left center;background-size:20px 20px;position:absolute;top:50%;left:15px;margin-top:-60px;width:20px;height:120px;}*/
			.shop-info .shop-info-img{position:absolute;top:15px;left:45px;width:90px;height:90px;}
			.shop-info .shop-info-img img{width:100%;height:100%;}
			.shop-info .shop-info-hide{display: none;}
			.shop-info .shooping-cart-ID{display: none;}
			.shop-info .shop-info-text{margin-left:130px; padding:25px 0;}
			.shop-info .shop-info-text .goods-name{font-size:15px; color: #555555; font-family: "PingFang-SC-Regular"; display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow: hidden;}
			.shop-info .shop-info-text .shop-brief{height:25px;line-height:25px;font-size:12px;color:#B1B1B1;white-space:nowrap;font-family: "PingFang-SC-Regular";}
			.shop-info .shop-info-text .shop-brief span{display:inline-block;margin-right:8px;}
			.shop-info .shop-info-text .shop-price{height:24px;line-height:24px;position:relative;}
			.shop-info .shop-info-text .shop-price .shop-pices {color:#DC5E5D;font-size:10px;}
			.shop-info .shop-info-text .shop-price .shop-pices .price {color:#DC5E5D;font-size:14px;}
			.shop-info .shop-info-text .shop-arithmetic{position:absolute;right:0px;top:0;width:84px;box-sizing:border-box;white-space:nowrap;height:100%;}
			.shop-info .shop-info-text .shop-arithmetic a{display:inline-block;width:23px;height:22px;line-height:22px;text-align:center;background:#fff;font-size:16px;}
			.shop-info .shop-info-text .shop-arithmetic .minus{display: inline-block; background-image: url(../img/goods/btn_jian.png); background-size: 100% 100%; width: 25px; height: 23px;}
			.shop-info .shop-info-text .shop-arithmetic .failed{color:#d1d1d1;}
			.shop-info .shop-info-text .shop-arithmetic .plus{display: inline-block;  background-image: url(../img/goods/btn_jia.png); background-size: 100% 100%; width: 25px; height: 23px;}
			.shop-info .shop-info-text .shop-arithmetic .minus:active{display: inline-block; background-image: url(../img/goods/btn_jian_w.png); background-size: 100% 100%; width: 25px; height: 23px;}
			.shop-info .shop-info-text .shop-arithmetic .plus:active{display: inline-block;  background-image: url(../img/goods/btn_jia_w.png); background-size: 100% 100%; width: 25px; height: 23px;}
			.shop-info .shop-info-text .shop-arithmetic .num{width:32px;text-align:center;border:none;display: inline-block;height:100%;box-sizing:border-box;vertical-align:top;margin:0 -6px;}
			.shop-info .delete-div {display: none; width: 45px; height: 120px; background-color: #013662; position: absolute; top: 0px; right: 0px; font-size: 13px; color: #FFFFFF; font-family: "PingFang-SC-Regular"; line-height: 120px; text-align: center;}
			
			.payment-bar{clear:both;overflow:hidden;width:100%;height:49px;position:fixed;bottom:50px;border-top:1px solid #e0e0e0;background:#fff;}
			.payment-bar .all-checkbox{float:left;line-height:49px;padding-left:40px;font-size: 13px; color: #737373; font-family: "PingFang-SC-Regular";}
			.payment-bar .shop-total{display: block; float:left;-webkit-box-flex:1.0;box-flex:1.0;margin:14px 20px 9px 35px;}
			.payment-bar .shop-total div{display:block;font-size:13px; color: #737373; font-family: "PingFang-SC-Regular";}
			.payment-bar .settlement{display:inline-block;float:right;width:100px;height:49px;line-height:49px;text-align:center;color:#fff;font-family: "PingFang-SC-Regular"; font-size:15px;background:#013662;}
			.payment-bar .collection-div{display: none; float:right;-webkit-box-flex:1.0;box-flex:1.0;width:120px;height:49px;line-height:49px;text-align:center;color:#fff;font-family: "PingFang-SC-Regular"; font-size:15px;background:#d10b38;}
			.special-div {
				margin-bottom: 50px;
			}
			.special-title {
				font-size: 14px;
				color: #444444;
			    text-align: center;
				font-family: "PingFang-SC-Regular";
			}
			.goods-ID-hide, .merchant-ID-hide {
				display: none;
			}
			/**********购物车**********/
			/**********个人中心**********/
			.person-container {
				margin-bottom: 50px;
			}
			.header-bg-div {
				width: 100%;
				height: 200px;
				background: url(../img/index/goods_image.png);
				background-size: 100% 100%;
				position: relative;
			}
			.shadow-div {
				width: 100%;
				height: 200px;
				text-align: center;
				background-color: rgba(255, 255, 255, 0.8);
			}
			.image-icon {
				width: 82px;
				height: 82px;
				border-radius: 50%;
				align-self: center;
				margin-top: 22px;
			}
			.peersShow {
				width: 100%;
				margin-bottom: 14px;
			}
			.span-integral {
				font-size: 10px;
				color: #434343;
				margin-top: 4px;
			}
			.span-signature {
			    font-size: 13px;
			    color: #434343;
			    line-height: 15px;
			}
			.signature-icon {
				width: 12px;
				height: 12px;
			}
			.item-icon {
				width: 17px;
				height: 17px;
				margin-right: 8px;
				margin-left: 14px;
				margin-top: 2px;
				float: left;
			}
			.btn-order-title {
				height: 51px;
				width: 28%;
				font-size: 15px;
				color: #A40000;
				font-family: PingFang-SC-Regular;
				border-color: transparent;
				border-bottom-color: #E08153;
				border-bottom-width: 2px;
				background: transparent;
				padding: 0;
			}
			.btn-orderH {
				height: 51px;
				width: 22%;
				font-size: 15px;
				color: #404040;
				font-family: PingFang-SC-Regular;
				border: none;
				background: transparent;
			}
			.title-div {
				margin-bottom: 14px;
			}
			.order-div {
				margin: 10px 14px 0px 14px;
			}
			.evaluation-div {
				margin: 0px 14px 0px 14px;
			}
			.item-order-div {
				position: relative;
				display: -webkit-box;
				background-color: white;
			}
			.item-evaluation-div {
				margin-top: 5px;
				position: relative;
				display: -webkit-box;
				background-color: white;
				height: 89px;
				border-radius: 8px;
			}
			.item-evaluation-list {
				margin-top: 5px;
				position: relative;
				display: -webkit-box;
				background-color: white;
				height: 75px;
				border-radius: 8px;
			}
			.goods-image {
				width: 62px;
				height: 62px;
				margin: 14px 0px 10px 20px;
			}
			.evaluation-icon {
				width: 25px;
				height: 25px;
				border-radius: 50%;
				margin-top: 15px;
			}
			.evaluation-star {
				width: 10px;
				height: 10px;
				margin: 30px 0px 10px 23px;
			}
			.order-info-div {
				margin-top: 14px;
				margin-left: 14px;
				margin-bottom: 14px;
			}
			.evaluation-icon-div {
				text-align: center;
				width: 70px;
				height: 75px;
			}
			.details-div {
				background: white;
				text-align: center;
				border-bottom-left-radius: 8px;
				border-bottom-right-radius: 8px;
			}
			.details {
				width: 14px;
				height: 8px;
			}
			.details-star {
				width: 12px;
				height: 12px;
				margin-top: 20px;	
				padding: 2px;	
			}
			.goods-name {
				color: #BDBDBD;
				font-size: 13px;
			}
			.goods-name-evaluation {
				color: #444444;
				font-size: 14px;
				margin-top: 10px;
				font-family: "PingFang-SC-Regular";
			}
			.order-number {
				font-size: 13px;
				color: #6B6B6B;
				font-family: "PingFang-SC-Regular";
			}
			.price {
				font-size: 14px;
				color: #6B6B6B;
				font-family: "PingFang-SC-Regular";
			}
			.order-info {
				font-size: 10px;
				color: #BDBDBD;
				font-family: "PingFang-SC-Regular";
			}
			.total-div {
				position: absolute;
				right: 15px;
				top: 36px;
				text-align: right;
			}
			.price-span {
				color: #E46918;
				font-size: 14px;
				font-family: "PingFang-SC-Regular";
			}
			.symbol-span {
				color: #E46918;
				font-size: 10px;
				font-family: "PingFang-SC-Regular";
			}
			.evaluation-item {
				color: #9F9F9F;
				font-size: 10px;
				line-height: 16px;
				padding-top: 5px;
				font-family: "PingFang-SC-Regular";
			}
			.evaluation-date {
				color: #9F9F9F;
				font-size: 10px;
				line-height: 18px;
				padding-top: 5px;
				position: absolute;
				top:45px;
				left: 0px;
				width: 145px;
				font-family: "PingFang-SC-Regular";
			}
			.overflow {
				display: -webkit-box;
				overflow:hidden;
	       		text-overflow:ellipsis;
	       		-webkit-box-orient: vertical;
	     		-webkit-line-clamp: 2;
			}
			.line-div {
				margin-top: 20px;
				height: 1px;
				background-color: #C5C5C5;
			}
			.courier {
				color: #9D9D9D;
				font-size: 15px;
				line-height: 14px;
				height: 14px;
				margin-left: 14px;
			}
			.li-courier {
				color: #9D9D9D;
				font-size: 13px;
				margin: 10px;
			}
			.li-no-point {
				list-style-type: none;
			}
			.vertical {
				height: 23px;
				width: 2px;
				background: #C5C5C5;
				float: left;
				margin-left: 14px;
			}
			.collection-div {
				height: 46px;
				padding-top: 15px;
			}
			.margin {
				margin: 0;
			}
			.line-margin {
				height: 1px;
				background: #C5C5C5;
				margin: 15px 0px 10px 0px;
			}
			.float {
				float: right;
				margin-top: 8px;
				margin-right: 14px;
			}
			.margin-left {
				margin-left:22px ;
			}
			.padd-top {
				padding-top: 10px;
			}
			.spacing {
				margin-top: 10px;
				margin-bottom: 10px;
			}
			.now-evaluate-info {
				margin: 0px 14px 0px 14px;
			}
			.item-order{
				padding-top: 10px;
				background-color: #FFFFFF;
				border-top-left-radius: 8px;
				border-top-right-radius: 8px;
			}
			.item-order-NO {
				margin-left: 10px;
				font-size: 13px;
				color: #444444;
				font-family: "PingFang-SC-Regular";
			}
			.item-order-total {
				margin-right: 10px;
				float: right;
				font-size: 13px;
				color: #444444;
				font-family: "PingFang-SC-Regular";
			}
			.goods-type, .goods-url, .hot-merchant-ID, .hot-goods-ID, .order-goods-ID, .order-merchant-ID, .merchant-ID {
				display: none;
			}
			.setting-div {
			    position: absolute;
			    top: 0px;
			    right: 0px;
			    width: 50px;
			    height: 40px;
			    text-align: center;
			}
			.setting-icon {
				width: 25px;
				height: 25px;
				margin-top: 8px;
			}
		</style>
	</head>

	<body>
		<nav id="slider" class="mui-bar mui-bar-tab">
			<a class="mui-tab-item mui-active" data-id="0" href="#tabbar">
				<span class="mui-icon tab-bottom-homepage"></span>
				<span class="mui-tab-label">首页</span>
			</a>
			<a class="mui-tab-item" data-id="1" href="#tabbar-with-chat">
				<span class="mui-icon tab-bottom-shoppingcar"></span>
				<span class="mui-tab-label">购物车</span>
			</a>
			<a class="mui-tab-item" data-id="2" href="#tabbar-with-contact">
				<span class="mui-icon tab-bottom-mine"></span>
				<span class="mui-tab-label">我的</span>
			</a>
		</nav>
		<div class="mui-content">
			<div id="tabbar" class="mui-control-content mui-active">
				<div class="mui-search">
					<div class="search-div">请输入内容</div>
				</div>
				<div class="category-view">
					<!--<div class="category-info">
	                    <img src="../img/index/jingpin_icon.png" class="category-image"></img>
	                    <div><label class="category-text">精品推荐</label></div>
	                </div>
	                <div class="category-info">
	                    <img src="../img/index/chihuo_icon.png" class="category-image"></img>
	                    <div><label class="category-text">吃货专区</label></div>
	                </div>
	                <div class="category-info">
	                    <img src="../img/index/shuiguo_icon.png" class="category-image"></img>
	                    <div><label class="category-text">水果达人</label></div>
	                </div>
	                <div class="category-info">
	                    <img src="../img/index/riyong_icon.png" class="category-image"></img>
	                    <div><label class="category-text">日用商品</label></div>
	                </div>-->
				</div>
				<div class="hot-image-div">
					<img class="hot-image"/>
					<div class="hot-title-div">
						<img src="../img/index/chihuo_icon.png" class="hot-title-icon" />
						<span class="hot-title">每日推荐</span>
					</div>
					<span class="goods-type"></span>
					<span class="goods-url"></span>
					<span class="hot-merchant-ID"></span>
					<span class="hot-goods-ID"></span>
					<div class="shadow-view">
	                    <span class="goods-name-text"></span>
	                    <span class="goods-des-text"></text>
	                    <div class="hot-bottom-view">
	                        <span class="price-text"></text>
	                        <span class="hot-text"></text>
	                    </div>
	                </div>
				</div>
				<div class='special-view'>
					<div class="special-title-div">
						<img src="../img/index/chihuo_icon.png" class="hot-title-icon" />
						<span class='special-view-text'>我的专场</text>
					</div>
		            <ul id="homespecialul" class="mui-table-view mui-grid-view">
				        <!--<li class="mui-table-view-cell mui-media mui-col-xs-6">
			                <div class="mui-media-object">
			                		<img class="special-image" src="../img/index/tuijian_bg.png" />
			                		<div class="special-info-div">
			                			<div class="special-text">夹心蒸蛋糕</div>
			                			<div class="special-collect-div">
			                				<img class="collect-icon" src="../img/index/chihuo_icon.png" />
			                				<span class="collect-span">333人</span>
			                			</div>
			                		</div>
			                		<div class="special-info-div">
			                			<div class="special-price">25.80¥</div>
			                			<div class="add-shopping-car-div"></div>
			                		</div>
			                	</div>
				        </li>-->
				    </ul> 
		        </div> 
			</div>
			<div id="tabbar-with-chat" class="mui-control-content">
				<header style="background-color:#013662;" class="mui-bar mui-bar-nav">
					<h1 style="color: #FFFFFF; font-size: 14px; font-family: "PingFang-SC-Regular";" class="mui-title">购物车</h1>
					<div class="mui-pull-right" style="margin-top: 12px;"><img style="width: 20px;" src="../img/goods/edit_icon.png" /></div>
				</header>
				<div class="shopping">
					<div class="shop-group-item">
						<ul>
						</ul>
					</div>
				</div>
				<div class="special-div">
					<div class="special-title">小U推荐</div>
					<ul id="specialul" class="mui-table-view mui-grid-view">
				    </ul>
				</div>
				<div class="payment-bar">
					<div class="all-checkbox"><input type="checkbox" class="check goods-check" id="AllCheck">全选</div>
					<div class="shop-total">
						<div>总价：<i class="total" id="AllTotal">0.00</i></div>
					</div>
					<div class="settlement">结算</div>
					<!--<div class="collection-div">移到收藏夹</div>-->
				</div>
			</div>
			<div id="tabbar-with-contact" class="mui-control-content">
				<div class="person-container">
					<div class="header-bg-div">
						<div class="shadow-div">
							<img class="image-icon" />
							<div class="span-integral"></div>
							<div class="peersShow">
								<img class="signature-icon" src="../img/goods/signature_icon.png" />
								<span class="span-signature"></span>
							</div>
						<!--<button type="button" class="button-participate">我的参与</button>-->
						</div>
						<div class="setting-div">
							<img class="setting-icon" src="../img/common/setting_icon.png" />
						</div>
					</div>
					<div class="title-div">
						<button type="button" id="order0" class="btn-order-title">进行中订单</button>
						<button type="button" id="order1" class="btn-orderH">待付款</button>
						<button type="button" id="order2" class="btn-orderH">待评价</button>
						<button type="button" id="order3" class="btn-orderH">全部订单</button>
					</div>
					<div id="orderListDiv"></div>
		
					
					<div class="line-div"></div>
					<!--<div class="collection-div">
						<div class="peersShow">
							<img class="item-icon" src="../img/person/star_header.png" />
							<span class="courier">我的收藏</span>
							<img class="details float" src="../img/person/go.png" />
						</div>
					</div>-->
					<div class="line-div margin"></div>
					<div class="collection-div">
						<div class="peersShow">
							<img class="item-icon" src="../img/person/star_header.png" />
							<span class="courier">购买的商品有了新的评价</span>
						</div>
					</div>
					<div class="now-evaluate-info">
						<!--<div id="goodsDetail" class="item-evaluation-div">
							<div id="goodsID" style="display: none;"></div>
							<img id="goodsImg" class="goods-image"/>
							<div class="order-info-div">
								<div class="goods-name-evaluation"></div>
								<span class="price"></span>
							</div>
							<div class="total-div">
								<div><span class="symbol-span">¥</span><span id="totalSpan" class="price-span"></span></div>
							</div>
						</div>-->
					</div>
					<div id="evaluationList">
					</div>
				</div>
			</div>
		</div>
	</body>
	<script type="text/javascript" src="../js/thirdparty/jquery-3.3.1.js" ></script>
	<script type="text/javascript" src="../js/thirdparty/mui.min.js" ></script>
	<script type="text/javascript" src="../js/thirdparty/swiper.min.js" ></script>
	<script type="text/javascript" src="../js/thirdparty/spin.min.js" ></script>
	<script type="text/javascript" src="../js/utils/boot.js" ></script>
	<script type="text/javascript">
		var userID = base.getParameter("userID");
		var tempMerchantID = null;
		var elementID = null;
		var isEdit = false;
		//当前激活选项
		var activeTab = 0;
		$(function () {
			var url = base.url.getHomePageData;
			var data = {
				userID: userID
			};
			base.postData(url,data,getHomePageDataSuccess);
		})
		function getHomePageDataSuccess(data) {
			if (data.success) {
				var goodsTypeList = data.context.goodsTypeList;
				var mySpecialList = data.context.mySpecialList;
				var everydayRecommend = data.context.everydayRecommend;
				setGoodsTypeList(goodsTypeList);//设置banner图片
				$(".hot-image").attr("src", everydayRecommend[1].goodsImg)
				$(".goods-type").text(data.context.everydayRecommend[1].type);
				$(".hot-merchant-ID").text(data.context.everydayRecommend[1].merchantID);
				if (data.context.everydayRecommend[1].type == 2) {
					$(".goods-url").text(data.context.everydayRecommend[1].url);
					$(".shadow-view").hide();
				} else {
					$(".hot-goods-ID").text(data.context.everydayRecommend[1].goodsId);
					$(".goods-name-text").text(everydayRecommend[1].goodsName);
					$(".goods-des-text").text(everydayRecommend[1].describe);
					$(".price-text").text("价格："+everydayRecommend[1].price/100);
					$(".hot-text").text("人气："+everydayRecommend[1].popularity);
				}
				var html = '';
				for(var index in mySpecialList) {
					html += getSpecialListItem(mySpecialList[index], index);
				}
				$("#homespecialul").html(html);
			} else {
				mui.toast(data.msg);
			}
		}
		function getSpecialListItem(item, index) {
			var html = '';
			html += '<li class="mui-table-view-cell mui-media mui-col-xs-6" data-index="' + index + '">'
			html += '	<div class="mui-media-object">'
			html += '		<img class="special-image" src="'+item.goodsImg+'" />'
			html += '		<div class="special-info-div">'
			html += '			<div class="special-text">'+(item.goodsName.length>7?(item.goodsName.substring(0, 6)+'...'):item.goodsName)+'</div>'
			html += '			<div class="special-goods-ID-hide">'+item.goodsID+'</div>'
			html += '			<div class="special-merchant-ID-hide">'+item.merchantID+'</div>'
			html += '			<div class="special-collect-div">'
			html += '				<img class="collect-icon" src="../img/common/hot_icon.png" />'
			html += '				<span class="collect-span">'+item.popularity+'人</span>'
			html += '			</div>'
			html += '		</div>'
			html += '		<div class="special-info-div">'
			html += '			<div class="special-price">'+(item.price/100)+'¥</div>'
			html += '			<div class="add-shopping-car-div"></div>'
			html += '		</div>'
			html += '	</div>'
			html += '</li>'
			return html;
		}
		function setGoodsTypeList(goodsTypeList) {
			var html = '';
			for(var index in goodsTypeList) {
				html += getGoodsTypeListItem(goodsTypeList[index]);
			}
			$(".category-view").html(html);
		}
		function getGoodsTypeListItem(item) {
			var html = '';
			html += '<div class="category-info">'
			html += '	<input type="hidden" name="goodsTypeVal" value="'+item.type+'">'
			html += '	<div class="category-type-ID">'+item.goodsTypeID+'</div>'
			html += '	<img src="'+item.goodsTypeLogo+'" class="category-image"></img>'
			html += '	<div><label class="category-text">'+item.goodsTypeName.substring(0,4)+'</label></div>'
			html += '</div>'
			return html;
		}
		$(".mui-search").on("tap", ".search-div", function() {
			parent.location.href = "search.html?userID="+userID;
		})
		$("#homespecialul").on("tap", ".mui-table-view-cell", function() {
			var _goodsID = $(this).find(".special-goods-ID-hide").text();
			var _merchantID = $(this).find(".special-merchant-ID-hide").text();
			parent.location.href = 'goodsDetail.html?userID='+userID+'&goodsID='+_goodsID+'&merchantID='+_merchantID;
		})
		$(".category-view").on("tap", ".category-info", function() {
			var type = $(this).find("input[name='goodsTypeVal']").val();
			if (type == 4) {
				var goodsTypeID = $(this).find(".category-type-ID").text();
				parent.location.href = "secKill.html?goodsTypeID="+goodsTypeID+"&userID="+userID;
			}else{
				var goodsTypeID = $(this).find(".category-type-ID").text();
				var goodsTypeName = $(this).find(".category-text").text();
				parent.location.href = "childIndex.html?goodsTypeID="+goodsTypeID+"&userID="+userID+"&goodsTypeName="+goodsTypeName;
			}
		})
		$(".hot-image-div").click(function(){
			var _goodsType = $(this).find(".goods-type").text();
			var _merchantID = $(this).find(".hot-merchant-ID").text();
			if (_goodsType == 2) { //跳转到其他链接
				var _url = $(this).find(".goods-url").text();
				window.location.href = _url;
			} else {
				var _goodsID = $(this).find(".hot-goods-ID").text();
				parent.location.href = "goodsDetail.html?userID="+userID+'&goodsID='+_goodsID+'&merchantID='+_merchantID;
			}
		});
		 //选项卡点击事件
		mui('.mui-bar-tab').on('tap', 'a', function(e) {
			var targetTab = $(this).data('id'); //获取点击的元素id
			if (targetTab == activeTab) {
				return;
			} 
			if (targetTab == 1) {
				getShoppingCart();
				getPushingGoods();
			} else if (targetTab == 2) {
				getMyCenter();
			}
			//更改当前活跃的选项卡
			activeTab = targetTab;
		});
		function getShoppingCart() {
			var url = base.url.getShoppingCart;
			var data = {
				userID: userID
			}
			base.postData(url,data,getShoppingCartSuccess);
		}
		// 数量减
		$(".shop-group-item").on('tap','.minus',function(){
			var t = $(this).parent().find('.num');
			t.text(parseInt(t.text()) - 1);
			if (t.text() <= 1) {
				t.text(1);
			}
			totalPrice();
		});
		// 数量加
	  	$(".shop-group-item").on('tap','.plus',function(){
			var t = $(this).parent().find('.num');
			t.text(parseInt(t.text()) + 1);
			if (t.text() <= 1) {
				t.text(1);
			}
			totalPrice();
		});
		// 点击店铺按钮
		$(".shop-group-item").on('change','.shopCheck',function(){
			if ($(this).prop("checked") == true) { //如果店铺按钮被选中
				$(this).parents("li").find(".goods-check").prop('checked', true); //店铺内的所有商品按钮也被选中
				if ($(".shopCheck").length == $(".shopCheck:checked").length) { //如果店铺被选中的数量等于所有店铺的数量
					$("#AllCheck").prop('checked', true); //全选按钮被选中
					totalPrice();
				} else {
					$("#AllCheck").prop('checked', false); //else全选按钮不被选中
					totalPrice();
				}
			} else { //如果店铺按钮不被选中
				$(this).parents("li").find(".goods-check").prop('checked', false); //店铺内的所有商品也不被全选
				$("#AllCheck").prop('checked', false); //全选按钮也不被选中
				totalPrice();
			}
		});
		// 勾选商品
	  	$(".shop-group-item").on('change','.goodsCheck',function(){
	  		tempMerchantID = $(this).closest(".shop-li").find(".merchant-ID").text();
	  		console.log(tempMerchantID);
		    var goods = $(this).closest(".goods-ul").find(".goodsCheck"); //获取本购物车的所有商品
		    var goodsC = $(this).closest(".goods-ul").find(".goodsCheck:checked"); //获取本购物车所有被选中的商品
		    var shops = $(this).closest(".shop-li").find(".shopCheck"); //获取本店铺的全选按钮
		    if (goods.length == goodsC.length) { //如果选中的商品等于所有商品
		    		shops.prop('checked', true); //店铺全选按钮被选中
		    		if ($(".shopCheck").length == $(".shopCheck:checked").length) { //如果店铺被选中的数量等于所有店铺的数量
			        $("#AllCheck").prop('checked', true); //全选按钮被选中
			        totalPrice();
			    } else {
			        $("#AllCheck").prop('checked', false); //else全选按钮不被选中 
			        totalPrice();
			    }
		    } else { //如果选中的商品不等于所有商品
		    		shops.prop('checked', false); //店铺全选按钮不被选中
		      	$("#AllCheck").prop('checked', false); //全选按钮也不被选中
		      	// 计算
		      	totalPrice();
		    }
		 });
		// 点击全选按钮
		$("#AllCheck").click(function() {
		    if ($(this).prop("checked") == true) { //如果全选按钮被选中
		      $(".goods-check").prop('checked', true); //所有按钮都被选中
		      totalPrice();
		    } else {
		      $(".goods-check").prop('checked', false); //else所有按钮不全选
		      totalPrice();
		    }
		});
		$(".shop-group-item").on('tap','.delete-div',function(){
	  		var shoopingCartID = $(this).closest(".shop-info").find(".shooping-cart-ID").text();
	  		elementID = $(this);
	  		delShoppingCart(0, shoopingCartID);//删除购物车中单个商品
		});
		$(".payment-bar").on('tap','.settlement',function(){
			if ($("#AllTotal").text() <= 0) { //用勾选的总价来判断是否勾选了商品
				mui.toast(isEdit?"请勾选删除的商品":"请勾选要购买的商品");
				return;
			}
			var _shoopingCartIDStr = "";
			var goodsStandardList = [];
			var _totalNum = 0;
			$(".shop-group-item").find(".goodsCheck").each(function(){
				if ($(this).is(":checked")) { //如果该商品被选中
					var shoopingCartID = $(this).closest(".shop-info").find(".shooping-cart-ID").text();
					if(isEdit) {
						_shoopingCartIDStr+=shoopingCartID;
						_shoopingCartIDStr+=",";
//						$(this).parent().parents("li").remove(); 
//						totalPrice();
					} else {
						var standardID = $(this).closest(".shop-info").find(".standard-ID").text(); //规格ID
						var goodsID = $(this).closest(".shop-info").find(".goods-ID").text(); //商品ID
						var num = parseInt($(this).closest(".shop-info").find(".num").text()); //得到商品的数量
						var price = parseFloat($(this).parents(".shop-info").find(".price").text()); //得到商品的单价
						var goodsImg = $(this).parents(".shop-info").find(".shop-info-img img").attr("src"); //得到商品的单价
						var goodsName = $(this).closest(".shop-info").find(".goods-name").text(); //商品名称
						var standard = $(this).closest(".shop-info").find(".shop-brief .standard-span").text()||"该商品没有规格"; //商品规格
						var subtotal = num * price;
						_totalNum+=num;
						var parms = {
							goodsID: goodsID,
							number: num,
							standardID: standardID,
							subtotal: subtotal,
							goodsImg: goodsImg,
							goodsName: goodsName,
							standard: standard,
							shoopingCartID: shoopingCartID,
							price: price
						}
						goodsStandardList.push(parms);//得到所有勾选商品的数组
					}
				}
			}) 
			if (isEdit) {
				_shoopingCartIDStr = _shoopingCartIDStr.substring(0, _shoopingCartIDStr.length-1);
				delShoppingCart(1, _shoopingCartIDStr);
			} else {
				console.log(goodsStandardList);
				//把json数据存储起来 然后跳转到结算页面
				window.localStorage.setItem("goodsStandardList", JSON.stringify(goodsStandardList));
				parent.location.href = "submitOrder.html?userID="+ userID+"&totalPrice="+ $("#AllTotal").text()+"&totalNum="+_totalNum+'&merchantID='+tempMerchantID;
			}
		});
		function delShoppingCart (type, _shoopingCartIDStr) {
			var url = base.url.delShoppingCart;
			var data = {
				userID: userID,
				shoopingCartID: _shoopingCartIDStr
			}
			base.postData(url,data,delShoppingCartSuccess.bind(null, type));
		}
		function delShoppingCartSuccess(type, data) {
			if (data.success) {
				mui.toast(data.msg);
//				if (type == 1) {
//					//批量删除商品
//					$(".shop-group-item").find(".goodsCheck").each(function(){
//						if ($(this).is(":checked")) { //如果该商品被选中
//							$(this).parent().parents("li").remove(); 
//							totalPrice();
//						}
//					})
//				} else { //单个删除商品
//					elementID.parents(".goods-li").remove();
//		    			totalPrice();
//				}
				getShoppingCart();
			} else {
				mui.toast(data.msg);
			}
		}
	    function getShoppingCartSuccess(data) {
	  		if (data.success) {
	  			var shoopingCartList = data.context.mySpecialList;
	  			var html = '';
				for (var index in shoopingCartList) {
					html += getListItem(shoopingCartList[index], index);
				}
				$(".shop-group-item ul").html(html);
	  		} else {
	  			mui.toast(data.msg);
	  		}
	    }
		//计算
		function totalPrice() {
		    var allprice = 0; //总价
		    var tempPrice = 0;
		      var oprice = 0; //商品总价
		       $(".shop-group-item").find(".goodsCheck").each(function() { //循环购物车里面的商品
		        if ($(this).is(":checked")) { //如果该商品被选中
		          var num = parseInt($(this).parents(".shop-info").find(".num").text()); //得到商品的数量
		          var price = parseFloat($(this).parents(".shop-info").find(".price").text()); //得到商品的单价
		          var total = price * num; //计算单个商品的总价
		          oprice += total; //计算该购物车的总价
		        }
		        tempPrice = oprice.toFixed(2);
		      });
		      allprice += parseFloat(tempPrice); //计算所有购物车的总价
	    		  $("#AllTotal").text(allprice.toFixed(2)); //输出全部总价
		  }
		$(".mui-pull-right").click(function() {
			isEdit = !isEdit; //true 表示编辑状态 false 表示结算状态
			if (isEdit) {
//				$(".collection-div").show();
				$(".shop-total").hide();
				$(".settlement").text("删除");
				$(".shop-pices").hide();
				$(".delete-div").show();
				$(".shop-info-text").css("margin-right", "45px");
			} else {
//				$(".collection-div").hide();
				$(".shop-total").show();
				$(".settlement").text("结算");
				$(".shop-pices").show();
				$(".delete-div").hide();
				$(".shop-info-text").css("margin-right", "0px");
			}
		});
		$(".shop-group-item").on('tap','.shop-info-img',function(){
			var _goodsID = $(this).closest(".shop-info").find(".goods-ID").text();
			var _merchantID = $(this).closest(".shop-info").find(".merchant-ID").text();
			parent.location.href = "goodsDetail.html?userID="+userID+'&goodsID='+_goodsID+'&merchantID='+_merchantID;
		});
		function getListItem(item,index) {
			var html = '';
			html += '<li class="shop-li" data-index="'+index+'">'
			html += '	<div class="shop-name">'
//			html += '		<input type="checkbox" class="check goods-check shopCheck">'
			html += '		<h4><a href="#">'+item.merchantName+'</a></h4>'
			html += '		<div class="merchant-ID">'+item.merchantID+'</div>'
			html += '	</div>'
			html += '	<ul class="goods-ul">'
			for (var goodsItem of item.shoopingCart) {
				html += '		<li class="goods-li">'
				html += '			<div class="shop-info">'
//				html += '				<input type="checkbox" class="check goods-check goodsCheck">'
				html += '				<input type="radio" name="goodsRadio" class="check goods-check goodsCheck">'
				html += '				<div class="shop-info-img"><img src="'+ goodsItem.goodsImg +'" /></div>'
				html += '				<div class="shop-info-hide"><span class="standard-ID">'+ goodsItem.standardID +'</span><span class="goods-ID">'+goodsItem.goodsID+'</span></div>'
				html += '				<div class="shooping-cart-ID">' + goodsItem.shoopingCartID + '</div>'
				html += '				<div class="shop-info-text">'
				html += '					<div class="goods-name">'+ goodsItem.goodsName +'</div>'
				html += '					<div class="shop-brief"><span>已选描述：</span><span class="standard-span">'+ goodsItem.standard +'</span></div>'
				html += '					<div class="shop-price">'
				html += '						<div class="shop-pices">￥<span class="price">'+ goodsItem.price +'</span></div>'
				html += '						<div class="shop-arithmetic">'
				html += '							<div class="minus"></div>'
				html += '							<span class="num" >'+goodsItem.number+'</span>'
				html += '							<div class="plus"></div>'
				html += '						</div>'
				html += '					</div>'
				html += '				</div>'
				html += '				<div class="delete-div">删除</div>'
				html += '			</div>'
				html += '		</li>'
			}
			html += '	</ul>'
			html += '</li>'
			return html;
		}
		function getPushingGoods() { //小U推荐接口
			var url = base.url.pushingGoods;
			var data = {
				userID: userID
			}
			base.postData(url,data,getPushingGoodsDataSuccess);
		}
		function getPushingGoodsDataSuccess(data) {
			if (data.success) {
				var tempPushingList = data.context.pushingList||[];
				showMySpecialList(tempPushingList);
			} else {
				mui.toast(data.msg);
			}
		}
		function showMySpecialList(list) {
			var html = '';
			for (var i in list) {
				html += getMySpecialListItem(list[i], i);
			}
			$("#specialul").html(html);
		}
		function getMySpecialListItem(item, index) {
			var html = '';
			html += '<li class="mui-table-view-cell mui-media mui-col-xs-6" data-index="' + index + '">'
			html += '	<div class="mui-media-object">'
			html += '		<img class="special-image" src="'+item.goodsImg+'" />'
			html += '		<div class="special-info-div">'
			html += '			<div class="special-text">'+(item.goodsName.length>7?(item.goodsName.substring(0, 6)+'...'):item.goodsName)+'</div>'
			html += '			<div class="goods-ID-hide">'+item.goodsID+'</div>'
			html += '			<div class="merchant-ID-hide">'+item.merchant+'</div>'
			html += '			<div class="special-collect-div">'
			html += '				<img class="collect-icon" src="../img/common/hot_icon.png" />'
			html += '				<span class="collect-span">'+item.popularity+'人</span>'
			html += '			</div>'
			html += '		</div>'
			html += '		<div class="special-info-div">'
			html += '			<div class="special-price">'+(item.price/100).toFixed(2)+'¥</div>'
			html += '			<div class="add-shopping-car-div"></div>'
			html += '		</div>'
			html += '	</div>'
			html += '</li>'
			return html;
		}
		$("#specialul").on("tap", ".mui-media-object", function() {//跳转到商品详情
			var _goodsID = $(this).find(".goods-ID-hide").text();
			var _merchantID = $(this).find(".merchant-ID-hide").text();
			parent.location.href = "goodsDetail.html?userID="+userID+'&goodsID='+_goodsID+'&merchantID='+_merchantID;
		})
		/**--------------以上为购物车功能-------------**/
		function getMyCenter() {
			var url = base.url.myCenter;
			var data = {
				userID: userID
			}
			base.postData(url,data,getDataSuccess);
		}
		function getDataSuccess(data) {
			if (data.success) {
				var dataInfo = data.context;
				$(".image-icon").attr("src", dataInfo.userInfo.headImg);
				$(".span-integral").text("积分："+dataInfo.userInfo.integral);
				$(".span-signature").text(dataInfo.userInfo.signature.substring(0, 20));
				var tempEvaluateList = dataInfo.nowEvaluateInfo;
				var orderHtml = '';
				for(var index in dataInfo.orderList) {
					orderHtml += getOrderListItem(dataInfo.orderList[index], index);
				}
				$("#orderListDiv").html(orderHtml);
				var html = '';
				for(var index in tempEvaluateList) {
					html += getCustomerEvaluationListItem(tempEvaluateList[index], index);
				}
				$("#evaluationList").html(html);
			} else {
				mui.toast(data.msg);
			}
		}
		function getCustomerEvaluationListItem (item,index) {
			var html = '';
			html += '<div class="item-evaluation-div">'
			html += '	<div class="order-goods-ID">'+item.goodsID+'</div>'
			html += '	<div class="order-merchant-ID">'+item.merchantID+'</div>'
			html += '	<img class="goods-image" src="'+item.goodsImg+'" />'
			html += '	<div class="order-info-div">'
			html += '		<div class="goods-name-evaluation">'+item.goodsName+'</div>'
			html += '		<span class="price">'+item.standard+'</span>'
			html += '	</div>'
			html += '	<div class="total-div">'
			html += '		<div><span class="symbol-span">¥</span><span class="price-span">'+item.totalPrice+'</span></div>'
			html += '	</div>'
			html += '</div>'
			html += '<div class="line-div spacing"></div>'
			for(var i in item.evaluateList) {
				html += '<div class="evaluation-div">'
				html += '	<div class="item-evaluation-list">'
				html += '		<div class="evaluation-icon-div">'
				html += '			<img class="evaluation-icon" src='+ item.evaluateList[i].headImg +' />'
				html += '			<div class="evaluation-item overflow">' + item.evaluateList[i].evaluator + '</div>'
				html += '		</div>'
				html += '		<div style="padding-top: 3px;margin-right: 80px;position: relative;">'
				html += '			<div class="evaluation-item padd-top overflow">'+item.evaluateList[i].content+'</div>'
				html += '			<span class="evaluation-date">'+item.evaluateList[i].createTime+'</span>'
				html += '		</div>'
				html += '		<div class="total-div">'
				for (var j=0;j < 5; j++) {
					if (j<item.evaluateList[i].stars) {
						html += '			<img class="star-icon" src="../img/person/star.png" />'
					} else {
						html += '			<img class="star-icon" src="../img/person/star_h.png" />' 
					}
				}
				html += '		</div>'
				html += '	</div>'
				html += '</div>'
			}
			return html;
		}		
		function getOrderListItem(item, index) {
			var html = '';
			html += '<div class="order-div" data-index="' + index + '">'
			html += '	<div class="item-order">'
			html += '		<span class="item-order-NO">订单号:'+ item.orderNo +'</span>'
			html += '		<span class="item-order-total">总价:'+item.totalPrice+'</span>'
			html += '	</div>'
			for(var j in item.orderDetail) {
				html += '	 <div class="item-order-div">'
				html += '		<img class="goods-image" src="' + item.orderDetail[j].goodsImg + '" />'
				html += '		<div class="order-goods-ID">'+item.orderDetail[j].goodsID+'</div>'
				html += '		<div class="order-merchant-ID">'+item.orderDetail[j].merchantID+'</div>'
				html += '		<div class="order-info-div">'
				html += '			<div class="goods-name">' + item.orderDetail[j].goodsName + '</div>'
				html += '			<div><span class="order-number"></span><span class="price">' + item.orderDetail[j].standard + '</span></div>'
				html += '		</div>'
				html += '		<div class="total-div">'
				html += '			<div><span class="symbol-span">¥</span><span class="price-span">' + item.orderDetail[j].totalPrice + '</span></div>'
				html += '		</div>'
				html += '	</div>'
			}
			html += '	<div class="details-div">'
			html += '		<img class="details" src="../img/person/open.png"/></div>'
			html += '	<div class="detailsList">'
			for(var i in item.logisticsList) {
				html += '	<div class="line-div"></div>'
				html += '	<li class="li-courier">' + item.logisticsList[i].alreadyOrderTime + '</li>'
				html += '	<div class="peersShow">'
				html += '		<div class="vertical"></div>'
				html += '		<span class="courier">' + item.logisticsList[i].alreadyOrder + '</span>'
				html += '	</div >'
			}
			html += '	</div>'
			html += '</div>'
			return html;
		}
//          点击展开
		var showDteils = false;
		mui('#orderListDiv').on('tap','.order-div', function() {
//			var details = $(this).find(".details");
			var detailsList = $(this).find(".detailsList");
			if (showDteils) {
				showDteils = false;
//				details.attr("src", "../img/person/open.png");
				detailsList.show();
			} else {
				showDteils = true;
//				details.attr("src", "../img/person/open.png");
				detailsList.hide();
			}
		});
		$(".header-bg-div").on("tap", ".setting-div", function() {
		    parent.location.href = "setting.html?userID="+userID;
		});
		$(".shadow-div").on("tap", ".image-icon", function() {
		    parent.location.href = "personInfo.html?userID="+userID;
		});
		$(".title-div").on("tap","#order0",function(){
			parent.location.href = "order.html?userID="+userID+"&orderType=2&isFromHomePage=1";
		})
		$(".title-div").on("tap","#order1",function(){
			parent.location.href = "order.html?userID="+userID+"&orderType=1&isFromHomePage=1";
		})
		$(".title-div").on("tap","#order2",function(){
			parent.location.href = "order.html?userID="+userID+"&orderType=3&isFromHomePage=1";
		})
		$(".title-div").on("tap","#order3",function(){
			parent.location.href = "order.html?userID="+userID+"&orderType=0&isFromHomePage=1";
		})
		$("#orderListDiv").on("tap",".item-order-div",function(){
			var _goodsID = $(this).find(".order-goods-ID").text();
			var _merchantID = $(this).find(".order-merchant-ID").text();
			parent.location.href = "goodsDetail.html?userID="+userID+'&goodsID='+_goodsID+'&merchantID='+_merchantID;
		})
		/**--------------以上为个人中心-------------**/
	</script>
</html>